public class Student {
   private String name;
   private double height;
   public void setname(String n){
       name = n;
   }
   public String getname(){
       return name;
   }
   public void setheight(double h) {
       if (h > 100.0 && h < 200.0) {
           height = h;
       }
       else{
           System.out.println("不合法");
       }
   }
   public double getheight(){
       return height;
   }
    public void study(){
        System.out.println("成绩优异");
    }
    public void sleep(){
        System.out.println("爱睡觉");
    }
}
